package dataint;

import java.util.*;

/**
 *
 * @author Vince
 */
public class Main {

    
    public static LinkedList<Customer> customerList = new LinkedList<Customer>();

    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        DataSource1 ds1 = new DataSource1();
        ds1.fetchData();

        DataSource2 ds2 = new DataSource2();

        XMLSource xml = new XMLSource();

        customerList.addAll(ds1.getCustomerList());
        customerList.addAll(ds2.getCustomerList());
        customerList.addAll(xml.getCustomerList());
        toConsole();
    }
    /**
     * Renders the final output as the predefined table schema of the exercise description
     */
    public static void toConsole() {
        Integer i = 1;
        for (Customer customer: customerList) {
            String line = i.toString() + "\t" + customer.toString();
            System.out.print(line + "\n");
            i++;
        }    
    }
}
